class GtpayTransaction < ActiveRecord::Migration
  def change
    create_table :spree_gtpay_transactions do |t|
      t.references :order
      t.string :gtpay_tranx_id 
      t.decimal :gtpay_tranx_amount, :precision => 8, :scale => 2
      t.string :gtpay_tranx_currency 
      t.integer :user_id 
      t.string :gtpay_tranx_status_code
      t.string :gtpay_tranx_memo
      t.string :gtpay_tranx_status_msg
      t.string :status
      t.timestamps
    end
    add_index :spree_gtpay_transactions, :gtpay_tranx_id
    add_index :spree_gtpay_transactions, :user_id
    add_index :spree_gtpay_transactions, :status
  end
end
